
These files provide nearly all of the data and code necessarcy to replicate the analysis results, with the exception of the crime event data which are available from Anchorage Police Department (contact details below). The primary software for the analysis was R with a number of additional packages installed (see session information below). The remainder of this readme describes:

A: Folder Topology
B: Replication Instructions
C: Data descriptions and sources
D: R session information

####################################################
A: Folder Topology:


/SubmissionFiles
----readme.txt
/SubmissionFiles/Data and Code 
----Aux data files and code for replication.
/SubmissionFiles/Data and Code/APD Crime
----This folder inentionally blank. Upload APD crime data here.
/SubmissionFiles/Data and Code/Figures
----The four figures from the paper are written to this folder.
/SubmissionFiles/Data and Code/Results
----Table A:5 is written to this folder.

####################################################
B: Replication Instructions: 

1. The main data for the analysis can be aquired from Anchorage Police Department (APD). Contact: Jennifer Leneave, APD Records Manager, JLeneave@muni.org. 907-786-2670.

2. These data were emailed in 17 seperate files (one per year) in xlsx format. We converted these xlsx files to .csv files for the analysis. There are batch scripts available online to do this conversion, or it can be done in R. Once this conversion is complete, the 17 files can be transfered to the folder "Data and Code/APD Crime/".  

2. Ensure these files have the following 8 variables, with collumn names:
`Call_No` `Call_Type`	`Call Type Desc`	`Report_No`	`Received_Date`	`Month`	`Year`	`Received_Time`

3. Open the R script file "/SubmissionFiles/Data and Code/UniversalCashCrime.R". It contains all code for merging, cleaning, and analyizing the data to replicate the main empirical results.

4. Change line 3 of the script to your local directory

5. The outline of the script is labeled according to each table or figure that section of script produces. Groups of tables or figures that are based on the same set of empirical estiamtes are grouped together, which means that the figures and tables are produced by the script in a different order than they appear in the paper.



####################################################
C: Data


Name: Anchorage Police Department: Computer Assisted Dispatch (CAD) Files
Description: Main data for the analyis. To aquire, contact Anchorage Police Department (APD), Jennifer Leneave, APD Records Manager, JLeneave@muni.org.
Data are timestamped records describing the nature of the officer's activity when making a call to dispatch.
Included in upload: No

Name: APD CAD catagorization
FileName: MajorCADType.csv
Description: Relational table between specific call codes and more general activity types - used in enforcement appendix.
Source: https://www.muni.org/Departments/police/Documents/PERF%20APD%20Deployment%20Study.pdf
Included in upload: Yes

Name: PFD payment Dates & Ammounts 
FileName: pfdDatesAmmounts.csv
Description: Dates and ammounts of PFD payments, 2000-2016.
Source: Compiled data from annual Permenent Fund Division Reports: https://pfd.alaska.gov/Division-Info/Annual-Reports
Included in upload: Yes

Name: PFD payment Dates & Ammounts - long form
FileName: pfdDatesAmounts_checks.csv
Description: Similar to above, but data are in long form so that each row represents an individual payment date rather than year.
Included in upload: Yes

Name: SNAP Payments
FileName: SnapPaymentAgg.csv
Description: Monthly SNAP participation (households) and distribution ammounts ($) for Alaska.
Source: https://www.fns.usda.gov/pd/supplemental-nutrition-assistance-program-snap
Included in upload: Yes

Name: Daily Weather Data - Ted Stevens Airport
FileName: TedStevsAirportStationDailyWeather_NOAA_NCEI.csv
Description: Daily weather data for the Ted Stevens Airport from NOAA's National Centers for Environmental Information. Variables include precipitation, snow fall, snow depth, average temp, daily high and low, and sunlight.
Included in upload: Yes

Name: Inflation
FileName: Inflation.csv
Description: Monthly consumer price index-urban from the BLS. 
Included in upload: Yes

####################################################
D: R session info:


R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bindrcpp_0.2.2      msm_1.6.6           multcomp_1.4-8      TH.data_1.0-9       survival_2.42-3     mvtnorm_1.0-8       car_3.0-0           carData_3.0-1      
 [9] margins_0.3.23      interplot_0.2.1     arm_1.10-1          lme4_1.1-17         MASS_7.3-50         abind_1.4-5         readr_1.1.1         sandwich_2.4-0     
[17] functional_0.6      formula.tools_1.7.1 gridExtra_2.3       reporttools_1.1.2   xtable_1.8-2        lmtest_0.9-36       zoo_1.8-3           multiwayvcov_1.2.3 
[25] scales_1.0.0        broom_0.5.0         stargazer_5.2.2     ggrepel_0.8.0       tis_1.34            RcppBDT_0.2.3       glmnet_2.0-16       foreach_1.4.4      
[33] Matrix_1.2-14       corrgram_1.13       reshape2_1.4.3      readxl_1.1.0        timeDate_3043.102   chron_2.3-52        ggplot2_3.0.0       dplyr_0.7.6        
[41] lubridate_1.7.4     circular_0.4-93     viridis_0.5.1       viridisLite_0.3.0  

loaded via a namespace (and not attached):
 [1] minqa_1.2.4           colorspace_1.3-2      class_7.3-14          modeltools_0.2-22     rio_0.5.10            rprojroot_1.3-2       mclust_5.4.1         
 [8] rstudioapi_0.7        flexmix_2.3-14        fansi_0.2.3           codetools_0.2-15      splines_3.5.1         robustbase_0.93-2     knitr_1.20           
[15] texreg_1.36.23        nloptr_1.0.4          interactionTest_1.0.1 cluster_2.0.7-1       kernlab_0.9-26        compiler_3.5.1        backports_1.1.2      
[22] assertthat_0.2.0      lazyeval_0.2.1        cli_1.0.0             htmltools_0.3.6       tools_3.5.1           coda_0.19-1           gtable_0.2.0         
[29] glue_1.3.0            Rcpp_0.12.18          cellranger_1.1.0      trimcluster_0.1-2.1   gdata_2.18.0          nlme_3.1-137          iterators_1.0.10     
[36] fpc_2.1-11.1          stringr_1.3.1         openxlsx_4.1.0        gtools_3.8.1          dendextend_1.8.0      DEoptimR_1.0-8        TSP_1.1-6            
[43] hms_0.4.2             parallel_3.5.1        expm_0.999-2          RColorBrewer_1.1-2    yaml_2.2.0            curl_3.2              stringi_1.1.7        
[50] gclus_1.3.1           seriation_1.2-3       caTools_1.17.1.1      zip_1.0.0             boot_1.3-20           operator.tools_1.6.3  rlang_0.2.1          
[57] pkgconfig_2.0.1       prabclus_2.2-6        bitops_1.0-6          evaluate_0.11         lattice_0.20-35       purrr_0.2.5           prediction_0.3.6     
[64] bindr_0.1.1           labeling_0.3          tidyselect_0.2.4      plyr_1.8.4            magrittr_1.5          R6_2.2.2              gplots_3.0.1         
[71] mgcv_1.8-24           pillar_1.3.0          haven_1.1.2           whisker_0.3-2         foreign_0.8-70        withr_2.1.2           nnet_7.3-12          
[78] tibble_1.4.2          crayon_1.3.4          utf8_1.1.4            KernSmooth_2.23-15    rmarkdown_1.10        grid_3.5.1            data.table_1.11.4    
[85] forcats_0.3.0         digest_0.6.15         diptest_0.75-7        tidyr_0.8.1           stats4_3.5.1          munsell_0.5.0         registry_0.5   


